import { Component } from '@angular/core';
import { NavController,ModalController } from 'ionic-angular';
//--------------------------引入页面--------------------------------------
import { OpenurlPage } from '../action/openurl/openurl';
import { OpenpdfPage } from '../action/openpdf/openpdf';
import { GetbatterystatusPage } from '../action/getbatterystatus/getbatterystatus';
import { OpenmapPage } from '../action/openmap/openmap';
import { ScannerPage } from '../action/scanner/scanner';
import { TexttospeechPage } from '../action/texttospeech/texttospeech';
import { ChangelightPage } from '../action/changelight/changelight';
import { PininputPage } from '../action/pininput/pininput';
//--------------------------引入页面--------------------------------------
@Component({
  selector: 'page-contact',
  templateUrl: 'contact.html'
})
export class ContactPage {

  constructor(
    public navCtrl: NavController,
    public modalCtrl:ModalController
  ) {

  }
  goAction(i){
    let url:any;
    switch(i){
      case 0: url=OpenurlPage;break;
      case 1: url=OpenpdfPage;break;
      case 2: url=GetbatterystatusPage;break;
      case 3: url=OpenmapPage;break;
      case 4: url=ScannerPage;break;
      case 5: url=TexttospeechPage;break;
      case 6: url=ChangelightPage;break;
      case 7: url=PininputPage;break;
    }

    let goPage=this.modalCtrl.create(url);
    
    setTimeout(()=>{
      goPage.present();
      },150)
    

  }

}
